import Vue from "vue";
import Router from "vue-router";
import Main from "@/views/Main.vue";
import Home from "@/views/Home.vue";
import ProductScheme from "@/views/ProductScheme.vue";
import ProductSchemePlatform from "@/views/ProductSchemePlatform.vue";
import ServiceProduct from "@/views/ServiceProduct.vue";
import ApplicationCases from "@/views/ApplicationCases.vue";
import About from "@/views/About.vue";

Vue.use(Router);

export default new Router({
  mode: "history",
  base: process.env.BASE_URL,
  routes: [
    {
      path: "/",
      name: "Main",
      component: Main,
      redirect: "/home",
      children: [
        // 首页
        {
          path: "/home",
          name: "Home",
          component: Home,
        },
        // 产品服务
        {
          path: "/product-scheme",
          name: "ProductScheme",
          component: ProductScheme,
        },
        // 智农
        {
          path: "/product-scheme-platform",
          name: "ProductSchemePlatform",
          component: ProductSchemePlatform,
        },
        // 解决方案
        {
          path: "/service-product",
          name: "ServiceProduct",
          component: ServiceProduct,
        },
        // 应用案例
        {
          path: "/application-cases",
          name: "ApplicationCases",
          component: ApplicationCases,
        },
        {
          path: "/about",
          name: "About",
          component: About,
        },
      ],
    },
  ],
});
